package com.boy.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boy.entity.Role;
import com.boy.mapper.RoleMapper;
import com.boy.service.RoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boy.tool.domain.Pos;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author whd
 * @since 2024-05-23
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public IPage<Role> find(Pos pos) {
        Page<Role> page = new Page<>(pos.getCurPage(), pos.getPageSize());
        return roleMapper.selectPage(page, null);
    }
}
